<?php
include('../conn.php');
$query="SELECT cliente.nombre as nombre,rfc,vendedor.nombre as vendedor,monto,dias_credito,limite_credito FROM cliente,vendedor WHERE cliente.alta='0' AND cliente.vendedor=vendedor.id";
$resul=mysql_query($query);

?>


  <table cellpadding="0" cellspacing="0" border="0" class="display" id="example" widht="50%">
	<thead>
		<tr>
			<th>Nombre</th>
			<th>RFC</th>
			<th>Vendedor</th>
			<th>Monto promedio de compra</th>
			<th>Dias de credito</th>
			<th>Limite de credito</th>			
		</tr>
	</thead>
	<tbody>
		<?php
		 while ($rows=mysql_fetch_array($resul)) 
		 {
		 	?>
		 	<tr>
		 		<td><?=$rows['nombre']?></td>
		 		<td><?=$rows['rfc']?></td>
		 		<td><?=$rows['vendedor']?></td>
		 		<td><?=$rows['monto']?></td>
		 		<td><?=$rows['dias_credito']?></td>
		 		<td><?=$rows['limite_credito']?></td>

		 	</tr>
		 	<?php
		 }

		?>
	</tbody>
  </table>
  <script>
      jQuery(document).ready(function() {
        jQuery('#example').dataTable({
        	 "oLanguage": {
        	 	 "sLengthMenu": 'Mostrar <select>'+
	        '<option value="10">10</option>'+
	        '<option value="20">20</option>'+
	        '<option value="30">30</option>'+
	        '<option value="40">40</option>'+
	        '<option value="50">50</option>'+
	        '<option value="50">100</option>'+
	        '<option value="-1">Todas</option>'+
	        '</select> marcas',
	         "sSearch" : "Buscar",
            "sZeroRecords": "No hay registros",
            "sInfo": "Mostrando _START_ hasta _END_ de _TOTAL_ registros",
            "sInfoEmpty": "Mostrando 0 hasta 0 de 0 registros",
            "sInfoFiltered": "(filtrado desde _MAX_ registros totales)",
            
            	"oPaginate": {
		            "sFirst":"Primero",
		            "sLast":"Ultimo",
		            "sNext":"Siguiente",
		            "sPrevious":"Anterior"
		        	}
       		 },
        "bJQueryUI": true,
        "bStateSave": true,
         "sPaginationType": "full_numbers",
         "bAutoWidth": false,
         
        });
      } );
    </script>
